package com.ruoyi.common.core.domain;

import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;
import tk.mybatis.mapper.provider.base.BaseInsertProvider;

/**
 * @author Dale Mao    ---多多 Email:453918229@qq.com
 * @description CommonMapper
 * @date 2021-01-26 13:42
 */


@RegisterMapper
public interface CommonMapper <T> extends Mapper<T>, MySqlMapper<T> {

    @Options(useGeneratedKeys = true, keyProperty = "id")
    @InsertProvider(type = BaseInsertProvider.class, method = "dynamicSQL")
    int insertSelective(T record);


}
